<?php
return array(
 'Product' =>array(//产品
 		'sql'			=> 'SELECT a.product_no,a.product_name,a.product_class_id,a.instock_price,a.sale_price FROM product a 
 							left join product_class_info b on(a.id=b.product_id)
 							left join gallery c on(a.id=c.relation_id and c.relation_type=1) 
							 WHERE '.getWhere($_SESSION[$_GET['rand']]).' GROUP BY a.id ORDER BY a.id desc',
 		'title'			=> array(
		 						'产品号',
								'产品名称',
								'类别名称',
								'进货单价',
								'销售单价',
						   ),
 		'content'		=> array(
	 							'product_no',
	 							'product_name',
	 							'class_name',
	 							'dml_instock_price',
	 							'dml_sale_price',
	 						)
  	),
  	'ProductClass' =>array(//产品类别
		'sql'			=> 'SELECT a.class_name as level1,b.class_name as level2,c.class_name as level3,d.class_name as level4 FROM `product_class`  as a 
							left join product_class as b on(a.id=b.parent_id and b.class_level=2)
							left join product_class as c on(b.id=c.parent_id and c.class_level=3)
							left join product_class as d on(c.id=d.parent_id and d.class_level=4)
							where '.getWhere($_SESSION[$_GET['rand']]).' and a.class_level=1 ORDER BY a.id desc',
 		'title'			=> array(
		 						'一级类别',
								'二级类别',
								'三级类别',
								'四级类别',
						   ),
 		'content'		=> array(
	 							'level1',
	 							'level2',
	 							'level3',
	 							'level4',
	 						)
  	),
  	'Color' =>array(//颜色
		'sql'			=> 'SELECT color_name,color_no FROM `color`  
							where '.getWhere($_SESSION[$_GET['rand']]).' and to_hide="1" ORDER BY id desc',
 		'title'			=> array(
		 						'颜色编号',
								'颜色名称',
						   ),
 		'content'		=> array(
	 							'color_no',
	 							'color_name',
	 						)
  	),
  	'Size' =>array(//尺码
		'sql'			=> 'SELECT size_name,size_no FROM `size`  
							where '.getWhere($_SESSION[$_GET['rand']]).' and to_hide="1" ORDER BY id desc',
 		'title'			=> array(
		 						'尺码编号',
								'尺码名称',
						   ),
 		'content'		=> array(
	 							'size_no',
	 							'size_name',
	 						)
  	),
  	'Properties' =>array(//属性
		'sql'			=> 'SELECT properties_no,properties_name,properties_type  FROM `properties`  
							where '.getWhere($_SESSION[$_GET['rand']]).' and to_hide="1" ORDER BY id desc',
 		'title'			=> array(
		 						'属性编号',
								'属性名称',
								'属性类型',
						   ),
 		'content'		=> array(
	 							'properties_no',
	 							'properties_name',
	 							'dd_properties_type',
	 						)
  	),
  	'Client' =>array(//客户
		'sql'			=> 'SELECT * FROM `company`  
							where '.getWhere($_SESSION[$_GET['rand']]).' and comp_type=1 ORDER BY id desc',
 		'title'			=> array(
		 						'客户编号',
								'客户名称',
								'税号',
								'所在国家',
								'所在城市',
								'联系人',
								'联系电话',
								'联系地址',
								'邮政编码',
								'传真号码',
								'E-mail',
								'备注说明',
						   ),
 		'content'		=> array(
	 							'comp_no',
	 							'comp_name',
	 							'tax_no',
	 							'country_name',
	 							'city_name',
	 							'contact',
	 							'phone',
	 							'address',
	 							'post_code',
	 							'fax',
	 							'comments',
	 						)
  	),
  	'Factory' =>array(//厂家
		'sql'			=> 'SELECT * FROM `company`  
							where '.getWhere($_SESSION[$_GET['rand']]).' and  comp_type=2 ORDER BY id desc',
 		'title'			=> array(
		 						'厂家编号',
								'厂家名称',
								'币种',
								'所在国家',
								'所在城市',
								'联系人',
								'联系电话',
								'联系地址',
								'邮政编码',
								'传真号码',
								'E-mail',
								'备注说明',
						   ),
 		'content'		=> array(
	 							'comp_no',
	 							'comp_name',
	 							'currency_no',
	 							'country_name',
	 							'city_name',
	 							'contact',
	 							'phone',
	 							'address',
	 							'post_code',
	 							'fax',
	 							'comments',
	 						)
  	),
  	'Logistics' =>array(//物流公司
		'sql'			=> 'SELECT * FROM `company`  
							where '.getWhere($_SESSION[$_GET['rand']]).' and  comp_type=3 ORDER BY id desc',
 		'title'			=> array(
		 						'物流公司编号',
								'物流公司名称',
								'税号',
								'所在国家',
								'所在城市',
								'联系人',
								'联系电话',
								'联系地址',
								'邮政编码',
								'传真号码',
								'E-mail',
								'备注说明',
						   ),
 		'content'		=> array(
	 							'comp_no',
	 							'comp_name',
	 							'tax_no',
	 							'country_name',
	 							'city_name',
	 							'contact',
	 							'phone',
	 							'address',
	 							'post_code',
	 							'fax',
	 							'comments',
	 						)
  	),
  	'OtherCompany' =>array(//其他来往单位
		'sql'			=> 'SELECT * FROM `company`  
							where '.getWhere($_SESSION[$_GET['rand']]).' and  comp_type=4 ORDER BY id desc',
 		'title'			=> array(
		 						'其他来往单位编号',
								'其他来往单位名称',
								'税号',
								'所在国家',
								'所在城市',
								'联系人',
								'联系电话',
								'联系地址',
								'邮政编码',
								'传真号码',
								'E-mail',
								'备注说明',
						   ),
 		'content'		=> array(
	 							'comp_no',
	 							'comp_name',
	 							'tax_no',
	 							'country_name',
	 							'city_name',
	 							'contact',
	 							'phone',
	 							'address',
	 							'post_code',
	 							'fax',
	 							'comments',
	 						)
  	),
  	'Basic' =>array(//公司列表
		'sql'			=> 'SELECT * FROM `basic`  
							where '.getWhere($_SESSION[$_GET['rand']]).' ORDER BY id desc',
 		'title'			=> array(
		 						'公司名称',
								'税号',
								'地址',
								'联系人',
								'联系电话',
								'传真',
								'E-mail',
								'通知单信息',
						   ),
 		'content'		=> array(
	 							'basic_name',
	 							'tax_no',
	 							'address',
	 							'contact',
	 							'phone',
	 							'fax',
	 							'email',
	 							'bank_account',
	 						)
  	),
  	'Warehouse' =>array(//仓库
		'sql'			=> 'SELECT * FROM `warehouse`  
							where '.getWhere($_SESSION[$_GET['rand']]).' ORDER BY id desc',
 		'title'			=> array(
		 						'仓库编号',
								'仓库名称',
								'所属公司',
								'仓库地址',
								'是否可用',
								'默认仓库',
								'备注',
						   ),
 		'content'		=> array(
	 							'w_no',
	 							'w_name',
	 							'basic_name',
	 							'w_address',
	 							'dd_is_use',
	 							'dd_is_default',
	 							'comments',
	 						)
  	),
  	'District' =>array(//国家
		'sql'			=> 'SELECT a.district_name,b.district_name as city_name FROM `district` as a 
							INNER join district as b on(a.id=b.parent_id and b.parent_id>0)
							where '.getWhere($_SESSION[$_GET['rand']]).'   ORDER BY a.id desc',
 		'title'			=> array(
		 						'国家名称',
								'城市名称',
						   ),
 		'content'		=> array(
	 							'district_name',
	 							'city_name',
	 						)
  	),
	'Department' =>array(//部门
		'sql'			=> 'SELECT * FROM `department`
							where '.getWhere($_SESSION[$_GET['rand']]).'   ORDER BY id desc',
 		'title'			=> array(
		 						'部门编号',
								'部门名称',
								'部门地址',
						   ),
 		'content'		=> array(
	 							'department_no',
	 							'department_name',
	 							'address',
	 						)
  	),
	'Position' =>array(//职务
		'sql'			=> 'SELECT * FROM `position`
							where '.getWhere($_SESSION[$_GET['rand']]).'   ORDER BY id desc',
 		'title'			=> array(
		 						'职务编号',
								'职务名称',
						   ),
 		'content'		=> array(
	 							'position_no',
	 							'position_name',
	 						)
  	),
  	'Employee' =>array(//员工
		'sql'			=> 'SELECT * FROM `employee`
							where '.getWhere($_SESSION[$_GET['rand']]).'   ORDER BY id desc',
 		'title'			=> array(
		 						'员工编号',
								'员工名称',
								'部门名称',
								'职务名称',
								'联系电话',
								'E-mail',
								'入职日期',
								'离职日期',
								'备注说明',
						   ),
 		'content'		=> array(
	 							'employee_no',
	 							'employee_name',
	 							'department_name',
	 							'position_name',
	 							'phone',
	 							'email',
	 							'entry_date',
	 							'leave_date',
	 							'comments',
	 						)
  	),
  	'Bank' =>array(//银行
		'sql'			=> 'SELECT * FROM `bank`
							where '.getWhere($_SESSION[$_GET['rand']]).'   ORDER BY id desc',
 		'title'			=> array(
		 						'银行简称',
								'银行名称',
								'币种名称',
								'银行卡号',
								'联系人',
								'联系电话',
								'联系地址',
								'备注说明',
						   ),
 		'content'		=> array(
	 							'employee_no',
	 							'employee_name',
	 							'department_name',
	 							'position_name',
	 							'phone',
	 							'email',
	 							'entry_date',
	 							'leave_date',
	 							'comments',
	 						)
  	),
  	'PayClass' =>array(//其他收入/支出类型列表
		'sql'			=> 'SELECT * FROM `pay_class`
							where '.getWhere($_SESSION[$_GET['rand']]).'   ORDER BY id desc',
 		'title'			=> array(
		 						'类型',
								'名称',
						   ),
 		'content'		=> array(
	 							'dd_pay_type',
	 							'pay_class_name',
	 						)
  	),
  	'Barcode' =>array(//条形码
		'sql'			=> 'SELECT * FROM `barcode`
							where '.getWhere($_SESSION[$_GET['rand']]).'   ORDER BY id desc',
 		'title'			=> array(
		 						'条形码号',
								'产品号',
								'产品名称',
						   ),
 		'content'		=> array(
	 							'barcode_no',
	 							'product_no',
	 							'product_name',
	 						)
  	),
)
?>